import * as XLSX from "xlsx";
import { addModels } from "./readXlsx";
import { addManyTower } from "@/apis/towerApi";

export async function readTower(wb: XLSX.WorkBook, id: number) {
  const model = {
    tName: "",
    tType: "",
    tStyle: "",
    corner: "",
    altitude: 1,
    remark: "",
    lineId: 1,
  } as TowerModel;
  return await addModels(wb, "towers", model, addManyTower, id);
}
